package cn.codingjc.peekaboo.api.web;

import cn.codingjc.peekaboo.application.config.limit.LimitFlow;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auth: coding_jc
 * @date: 2023/4/12 22:10
 * @desc:
 */

@RestController
public class HelloController {

    @GetMapping("/hello")
    @LimitFlow(count = 1, time = 3)
    @PreAuthorize("hasPermission('system:hello')")
    public String hello(){
        return "hello";
    }
}
